<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=8" />

<title>填写注册码</title>
<script language="javascript">
function entSn(){
var snnum = $('sn').value;
var macx = Cookie.read('__MAC');
//alert(snnum+':::'+macx);
if(snnum.length>30)
{
	var urlstr = 'http://yuanbao.org/Y/index.php/Admin/chkSN';
	//var urlstr = 'http://yuanbao/index.php/Admin/chkSN';
	new Request.JSONP({
	url:  urlstr,
    data: {
        sn: snnum,
        mac: macx
    },	
	onComplete: function(data){
				if(data['status']=='ok')
				{
				var datastr = 'HAS_SN='+2+'&sn='+data['data'];
				var myRequest = new Request.JSON({
				method: 'post', 
				url: 'index.php/Admin/upUser',
				headers: 'Content-Type:text/html; charset=utf-8',
				data: datastr,
				onSuccess: function(data){
						
						if((data['status']=='ok') || (data[0]['status']=='ok'))
						{msg('注册码验证成功~');
						updateMain('Serial number','index.php/Product');					
						}
						else
						{
							msg('验证失败');
						}
				},		
				onFailure: function(){
					msg('请求失败');
						}	
				}).send(); 					
				}
				else
				{msg(data['msg']);}
	}
	}).send();
}
else
{msg('您填写的序列号不正确');}
}
</script>
</head>	
<body>
<pre>请到{$Think.session.UserInfo.email}收取序列号,填写在此处：<input type="text" size="35" id="sn"/><BR/>
                                        <input type="button" id="bt2" name="bt2" onclick="entSn()" class="button"  value="提交" />
<br/>仅适用于本台电脑,如果这个Email不是您的，请点<a href="javascript:window.location.href='__APP__/Admin/logout';"  >这里退出登录</a>，用您的用户id登陆或者重新注册  

  </pre>
</body>
</html>